Integrand size = 34, antiderivative size = 120 \[ \int \frac {\csc (e+f x)}{\sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=-\frac {2 \text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{\sqrt {a} c f}+\frac {\text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a+a \sin (e+f x)}}\right )}{\sqrt {2} \sqrt {a} c f}+\frac {\sec (e+f x) \sqrt {a+a \sin (e+f x)}}{a c f} \]
[Out]
Time = 0.32 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.206, Rules used = {3019, 2815, 2752, 3064, 2728, 212, 2852} \[ \int \frac {\csc (e+f x)}{\sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=-\frac {2 \text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a \sin (e+f x)+a}}\right )}{\sqrt {a} c f}+\frac {\text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a}}\right )}{\sqrt {2} \sqrt {a} c f}+\frac {\sec (e+f x) \sqrt {a \sin (e+f x)+a}}{a c f} \]
[In]
[Out]
Rule 212
Rule 2728
Rule 2752
Rule 2815
Rule 2852
Rule 3019
Rule 3064
Rubi steps \begin{align*} \text {integral}& = \frac {\int \frac {\sqrt {a+a \sin (e+f x)}}{c-c \sin (e+f x)} \, dx}{2 a}+\frac {\int \frac {\csc (e+f x) (2 a c+a c \sin (e+f x))}{\sqrt {a+a \sin (e+f x)}} \, dx}{2 a c^2} \\ & = -\frac {\int \frac {1}{\sqrt {a+a \sin (e+f x)}} \, dx}{2 c}+\frac {\int \sec ^2(e+f x) (a+a \sin (e+f x))^{3/2} \, dx}{2 a^2 c}+\frac {\int \csc (e+f x) \sqrt {a+a \sin (e+f x)} \, dx}{a c} \\ & = \frac {\sec (e+f x) \sqrt {a+a \sin (e+f x)}}{a c f}+\frac {\text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{c f}-\frac {2 \text {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{c f} \\ & = -\frac {2 \text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{\sqrt {a} c f}+\frac {\text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a+a \sin (e+f x)}}\right )}{\sqrt {2} \sqrt {a} c f}+\frac {\sec (e+f x) \sqrt {a+a \sin (e+f x)}}{a c f} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.32 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.62 \[ \int \frac {\csc (e+f x)}{\sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=-\frac {\left (\operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},\frac {1}{2} (1-\sin (e+f x))\right )-2 \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},1-\sin (e+f x)\right )\right ) \sec (e+f x) \sqrt {a (1+\sin (e+f x))}}{a c f} \]
[In]
[Out]
Time = 0.39 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.03
method | result | size |
default | \(\frac {\left (1+\sin \left (f x +e \right )\right ) \left (\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a^{2} \sqrt {a -a \sin \left (f x +e \right )}+2 a^{\frac {5}{2}}-4 \,\operatorname {arctanh}\left (\frac {\sqrt {a -a \sin \left (f x +e \right )}}{\sqrt {a}}\right ) a^{2} \sqrt {a -a \sin \left (f x +e \right )}\right )}{2 c \,a^{\frac {5}{2}} \cos \left (f x +e \right ) \sqrt {a +a \sin \left (f x +e \right )}\, f}\) | \(124\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 328 vs. \(2 (104) = 208\).
Time = 0.29 (sec) , antiderivative size = 328, normalized size of antiderivative = 2.73 \[ \int \frac {\csc (e+f x)}{\sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\frac {\sqrt {2} \sqrt {a} \cos \left (f x + e\right ) \log \left (-\frac {\cos \left (f x + e\right )^{2} - {\left (\cos \left (f x + e\right ) - 2\right )} \sin \left (f x + e\right ) + \frac {2 \, \sqrt {2} \sqrt {a \sin \left (f x + e\right ) + a} {\left (\cos \left (f x + e\right ) - \sin \left (f x + e\right ) + 1\right )}}{\sqrt {a}} + 3 \, \cos \left (f x + e\right ) + 2}{\cos \left (f x + e\right )^{2} - {\left (\cos \left (f x + e\right ) + 2\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 2}\right ) + 2 \, \sqrt {a} \cos \left (f x + e\right ) \log \left (\frac {a \cos \left (f x + e\right )^{3} - 7 \, a \cos \left (f x + e\right )^{2} - 4 \, {\left (\cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right ) + 3\right )} \sin \left (f x + e\right ) - 2 \, \cos \left (f x + e\right ) - 3\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {a} - 9 \, a \cos \left (f x + e\right ) + {\left (a \cos \left (f x + e\right )^{2} + 8 \, a \cos \left (f x + e\right ) - a\right )} \sin \left (f x + e\right ) - a}{\cos \left (f x + e\right )^{3} + \cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right )^{2} - 1\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 1}\right ) + 4 \, \sqrt {a \sin \left (f x + e\right ) + a}}{4 \, a c f \cos \left (f x + e\right )} \]
[In]
[Out]
\[ \int \frac {\csc (e+f x)}{\sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=- \frac {\int \frac {1}{\sqrt {a \sin {\left (e + f x \right )} + a} \sin ^{2}{\left (e + f x \right )} - \sqrt {a \sin {\left (e + f x \right )} + a} \sin {\left (e + f x \right )}}\, dx}{c} \]
[In]
[Out]
\[ \int \frac {\csc (e+f x)}{\sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\int { -\frac {1}{\sqrt {a \sin \left (f x + e\right ) + a} {\left (c \sin \left (f x + e\right ) - c\right )} \sin \left (f x + e\right )} \,d x } \]
[In]
[Out]
none
Time = 0.35 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.18 \[ \int \frac {\csc (e+f x)}{\sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=-\frac {\sqrt {2} {\left (\frac {2 \, \sqrt {2} \log \left (\frac {{\left | -2 \, \sqrt {2} + 4 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \right |}}{{\left | 2 \, \sqrt {2} + 4 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \right |}}\right )}{c} + \frac {\log \left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{c} - \frac {\log \left (-\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{c} + \frac {2}{c \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )}\right )}}{4 \, \sqrt {a} f \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} \]
[In]
[Out]
Timed out. \[ \int \frac {\csc (e+f x)}{\sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\int \frac {1}{\sin \left (e+f\,x\right )\,\sqrt {a+a\,\sin \left (e+f\,x\right )}\,\left (c-c\,\sin \left (e+f\,x\right )\right )} \,d x \]
[In]
[Out]